﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="bbs.aspx.cs" Inherits="Web.bbs" %>

<%@ Register Src="~/controls/head.ascx" TagPrefix="uc1" TagName="head" %>
<%@ Register Src="~/controls/login.ascx" TagPrefix="uc1" TagName="login" %>
<%@ Register Src="~/controls/login_status.ascx" TagPrefix="uc1" TagName="login_status" %>




<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <link href="CSS/css.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <uc1:head runat="server" ID="head" />
        </div>
        
        <div class="content">
            <div class="bbs_note_blueline" style="margin-top: 20px; margin-bottom: 5px;"></div>
            <div class="bbs_class_list">
                <asp:ListView ID="ListView1" runat="server" ItemPlaceholderID="hold" OnItemCommand="select_ItemCommand" >
                    <LayoutTemplate>
                        <div id="hold" runat="server"></div>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <div class="bbs_class_list_item">
                            <div id="Div1" class="bbs_class_list_item_left" runat="server">
                                <asp:Image ID="Image1" runat="server" ImageUrl='<%#Eval("class_img") %>' />
                            </div>
                            <div id="Div2" class="bbs_class_list_item_right" runat="server">
                                <asp:LinkButton ID="Linkbt" runat="server" CommandName="selectlist" CommandArgument='<%#Eval("ID") %>' Text=' <%#Eval("class_name") %>'></asp:LinkButton>
                                <br /><br />
                                贴数：<%#Eval("class_count") %></div>
                        </div>
                    </ItemTemplate>
                </asp:ListView>
            </div>
            <div class="line-dot">
            </div>
            <div class="bbs_note_blueline">
            </div>
            <div class="bbs_note_title">
                <asp:Label ID="not_title" runat="server" Text=""></asp:Label>
                <asp:Button ID="Button1" runat="server" Text="发表新帖" OnClick="Button1_Click" />
            </div>
          <div class="bbs_note_list_left">
                <uc1:login runat="server" ID="login" />
              <uc1:login_status runat="server" ID="login_status" />
            </div>
            <div class="bbs_note_list_right">
                <asp:ListView ID="ListView2" runat="server" ItemPlaceholderID="holdd" DataSourceID="notelist" >
                    <LayoutTemplate>
                        <div runat="server" id="holdd"></div>
                        <br />
                        <asp:DataPager ID="DataPager1" runat="server">
                            <Fields>
                                <asp:NextPreviousPagerField ShowFirstPageButton="true" />
                                <asp:NumericPagerField ButtonCount="5" />
                            </Fields>
                        </asp:DataPager>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <div class="bbs_note_blueline"></div>
                        <div class="bbs_note_infoline">
                            <div class="bbs_note_infoline_title">   <a href="bbsshow.aspx?id=<%#Eval("ID") %>" ><%#Eval("title") %></a></div>
                            <div class="bbs_note_infoline_right1"><%#Eval("username") %></div>
                            <div class="bbs_note_infoline_right1"><%#Eval("post_time")%></div>
                        </div>
                        <div class="bbs_note_blueline"></div>
                    </ItemTemplate>
                </asp:ListView>
                <asp:SqlDataSource ID="notelist" runat="server" ConnectionString="<%$ ConnectionStrings:Mystudy_testConnectionString %>" SelectCommand="SELECT * FROM [vi_note_list] WHERE ([class_id] = @class_id)">
                    <SelectParameters>
                        <asp:SessionParameter Name="class_id" SessionField="CLASSID" Type="Int32" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </div>

            </div>
    </form>
</body>
</html>
